import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
const PlayList = () => import('@/views/PlayList')
const SongPage=()=>import('@/views/SongPage')
Vue.use(VueRouter)

const routes = [
  { path: '/', name: 'home', component: Home },
  { path: '/playlist/:id', name: 'playlist', component: PlayList, props: true },
  {path:'/songpage/:id/:title',name:'songpage',component:SongPage,props:true}
]

const router = new VueRouter({
  routes // (缩写) 相当于 routes: routes
})
export default router